package cn.com.roy.thread.t3_1_12.pipeInputOutput;

import java.io.PipedOutputStream;

public class ThreadWrite extends Thread{
    private PipedOutputStream outputStream ;
    private WriteData writeData;

    public ThreadWrite(WriteData writeData ,PipedOutputStream outputStream){
        this.outputStream = outputStream;
        this.writeData = writeData;
    }

    @Override
    public void run() {
        super.run();
        writeData.writeMethod(outputStream);
    }
}
